/**
 * RequestMessageDeliver.java
 * ************************** 
 * @date May 18, 2011
 * @author Michele Tamburini
 * 
 * **************************
 */
package infrastructureAPI.backendGate;

import java.net.UnknownHostException;
import java.rmi.NotBoundException;
import java.rmi.RemoteException;

import messages.Message;

/**
 * Description: 
 * The RequestMessageDeliver interface defines the function
 * used to deliver a Message from a Requester node to
 * the Back-End of the P2PCloudSystem, where the 
 * request may be executed.
 *
 */
public interface RequestMessageDeliver {

	/**
	 * Delivers the input Message 'msg' to its the destination
	 * node looking for the 'service' in the local rmiregistry.
	 * 
	 * @param msg
	 * @param service
	 * @return done : boolean
	 * @throws RemoteException
	 * @throws NotBoundException
	 * @throws UnknownHostException
	 */
	public boolean deliver(Message msg, String service) throws RemoteException, 
			NotBoundException, UnknownHostException;
}
